﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;

using Wicresoft.SMS.Data;

namespace Wicresoft.SMS.Web
{

    public class CustomRoleProvider : SqlRoleProvider
    {
        public static IUserRoleService _service;

        public CustomRoleProvider()
        {
            if (_service == null)
            {
                _service = DependencyInjectFacotry.CreateUserRoleService();
            }

        }

        public override string[] GetRolesForUser(string username)
        {
            return _service.GetRolesForUser(username);
        }
    }
}